﻿// -----------------------------------------------------------------------
// <copyright file="ClientData.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------


namespace HashMaster.Lib
{
    //using System.Linq;
    using System.Runtime.Serialization;

    /// <summary>
    /// 子任务参数，通过服务返回值传递给客户端
    /// </summary>
    [DataContract]
    public class ClientSyncData
    {
        /// <summary>
        /// 任务Imei值
        /// </summary>
        [DataMember]
        public string Imei { get; set; }

        /// <summary>
        /// 任务sha值
        /// </summary>
        [DataMember]
        public string Sha { get; set; }

        /// <summary>
        /// 任务分块宽度 分块数量=10^分块宽度
        /// </summary>
        [DataMember]
        public int SliceWidth { get; set; }

        /// <summary>
        /// 子任务分块编号
        /// </summary>
        [DataMember]
        public int SliceNum { get; set; }

        /// <summary>
        /// 错误代码
        /// </summary>
        [DataMember]
        public int ErrorCode { get; set; }

        /// <summary>
        /// 任务Id
        /// </summary>
        [DataMember]
        public int JobId { get; set; }
        
        /// <summary>
        /// 任务进度 
        /// </summary>
        [DataMember]
        public double Progress { get; set; }

        /// <summary>
        /// 客户机名称 由用户自定义
        /// </summary>
        [DataMember]
        public string ClientName { get; set; }

        /// <summary>
        /// 客户机Mac地址 自动获取
        /// </summary>
        [DataMember]
        public string MacAddress { get; set; }

        /// <summary>
        /// 运算结果
        /// </summary>
        [DataMember]
        public string Result { get; set; }

        public ClientSyncData() 
        {
            Result = string.Empty;
        }
    }
}
